<template>
  <div>
  <van-form @submit="onSubmit">
  <van-field
    v-model="user.name"
    name="申请人名称"
    label="申请人名称"
    placeholder="申请人名称"
    
  />
  <van-field
    v-model="user.money"
    required
    name="申请金额"
    label="申请金额"
    placeholder="请输入申请金额"
    
  />
   <van-field
    v-model="user.moneyUse"
    required
    name="贷款用途"
    label="贷款用途"
    placeholder="经营贷款"
    
  />
   <van-field
    v-model="user.guarantee"
    required
    name="主要担保方式"
    label="主要担保方式"
    placeholder="信用贷款"
    
  />
  <van-field
  v-model="user.place"
   required
  is-link
  readonly
  label="现居地"
  placeholder="省    市     区"
  @click="show = true"
/>
   <van-field
    v-model="user.pathName"
    required
    name="现居地详细地址"
    label="现居地详细地址"
    placeholder="请输入详细地址"
    
  />
    <!-- <van-field
    v-model="password"
    required
    name="意向网点"
    label="意向网点"
    placeholder="信用贷款"
    
  />
    -->
</van-form>
   
        <van-popup v-model="show" round position="bottom">
  <van-cascader
    v-model="cascaderValue"
    title="请选择所在地区"
    :options="options"
    @close="show = false"
    @finish="onFinish"
  />
</van-popup>
	<!-- <ab-cust-dialog-oold :lx='true' :model="user" value-name="pathName"  style="margin-top:5px;" :dialogSetting="{displayFields:[{showName:'姓名',columnName:'name'}],multiple:false}"  dialogKey="userSelector" >
    分支组织结构
        </ab-cust-dialog-oold> -->
        <ab-easy-cost head='意向网点'  @afok='afok'  style="margin-top:5px;"  >
         意向网点
        </ab-easy-cost>

        <!-- <ab-cust-dialog class="weui-btn weui-btn_mini weui-btn_primary fa fa-search" href="javascript:void(0)" 
        dialog-key="fzzzjg" :model="data.incomingBusinessObj.WF_LOAN_APPLICATION" :query-param="{}" :init-param="{}" :dialog-setting="{&quot;multiple&quot;:false}" 
        value-name="BANK_NETWORK" value-id="NETWORK_CODE">分支组织机构</ab-cust-dialog> -->
  </div>
</template>

<script>
// import AbCustDialogOold from '@/components/form/abCustDialogOold'
// import AbEasyCost from '@/components/form/abEasyCost'

import Vue from 'vue';
import { Form,Cascader,Field,Popup   } from 'vant';



Vue.use(Form);
Vue.use(Field);
Vue.use(Cascader);
Vue.use(Popup);
export default {
  components: {
    // AbCustDialogOold,
    // AbEasyCost
   
  },
  data(){
    return{
      show: false,
      cascaderValue:'',
      user:{
        name:'',
        money:'',
        moneyUse:'',
        guarantee:'',
        place:'',
        pathName:'',
      },
      options: [
        // {
        //   text: '浙江省',
        //   value: '330000',
        //   children: [{ text: '杭州市', value: '330100' }],
        // },
        // {
        //   text: '江苏省',
        //   value: '320000',
        //   children: [{ text: '南京市', value: '320100' }],
        // },
      ]
    }
  },
  methods:{
    afok(val){
     this.user.place = val.name
     this.user.pathName = val.id
    },
    onSubmit(){

    },
     onFinish({ selectedOptions }) {
      this.show = false;
      this.user.place = selectedOptions.map((option) => option.text).join('/');
    },
  },
  created(){
    //  this.baseService
    //     .postForm(this.__ctx + "/org/group/queryByAreaCode",{areaCode:'1'}).then((data) => {
    //      console.log(data);
    //     });
  },
  computed:{
    text(){
      return '分支组织结构'
    }
  }
  
}
</script>

<style lang="less" scoped>

</style>